home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
mus
/
midi
/
MusicXRexxMacs.lha
/
macros
/
INVERT.mxe
< prev
next >
Wrap
Text File
|
1997-02-13
|
1KB
|
79 lines
/* inverts notes to defined limits */
/* © Dick Doyle */
options results
MXSLIDER "Upper Limit:,0,127,72"
MXSLIDER "Lower Limit:,0,127,60"
MXRADIO "Selected Notes,All Notes"
MXSLIDER "Channel Select,1,16,1"
MXREQUEST "INVERT,DO IT"
if result == 0 then exit
MXPOINTER "sleepy"
MXVALUE 1
Highval = result
MXVALUE 2
Lowval = result
MXVALUE 4
Chanum = result
MXVALUE 3
if result == 0 then BEGINSCAN 'selected'
else BEGINSCAN 'all'
if result ~= 0 then do forever
NEXTEVENT
if result == 0 then break
if EVENT.CHANNEL == chanum - 1 then
if EVENT.TYPE == 'NOTE' then
if EVENT.num > highval then
do while EVENT.NUM > highval
EVENT.NUM = EVENT.NUM - 12
REPLEVENT
end
end
ENDSCAN
MXVALUE 3
if result == 0 then BEGINSCAN 'selected'
else BEGINSCAN 'all'
if result ~= 0 then do forever
NEXTEVENT
if result == 0 then break
if EVENT.CHANNEL == chanum - 1 then
if EVENT.TYPE == 'NOTE' then
if EVENT.num < lowval then
do while EVENT.NUM < lowval
EVENT.NUM = EVENT.NUM + 12
REPLEVENT
end
end
ENDSCAN
MXPOINTER "normal"
exit